from typing import List

from infirmary_admin_src.infirmary_common.infirmary_controller import IBaseController
from infirmary_admin_src.infirmary_common.infirmary_controller.rest_controller_with_depends import \
    RestControllerWithDepends
from fastapi import Request, Depends, Path, Body

from infirmary_admin_src.infirmary_smart_admin.infirmary_biz.infirmary.businesses.schemas import SchemaBase
from infirmary_admin_src.infirmary_smart_admin.infirmary_biz.system.employee.services import EmployeeBusinesses



class XParam(SchemaBase):
    '''
    账号密码登录参数
    '''
    id: int = Path(..., title="Id", description='Id')


class IController(IBaseController):
    '''
    定制相关约束检测函数逻辑步序
    '''

    def __init__(self, *, request: Request,
                 schema_param: XParam=Depends(),
                 ):
        super().__init__(request=request)
        # 入参参数
        # 入参参数
        self.schema_param = schema_param


@RestControllerWithDepends()
class SystemEmployeePasswordResetController(IController):

    def business_login(self):
        pass
        # 查询用户信息，联表查询比较麻烦
        #  **{**self.schema_param.dict(exclude_unset=True, exclude={'is_trusted'}),
        result = EmployeeBusinesses.edit_sys_employee_password_reset(
            employee_id=self.schema_param.id,
        )
        return 'zyg123456'
